<h1><span class="reg_ico"></span><?= lang('label_menu_link_sendsms'); ?></h1>
<script type="text/javascript">
    $(document).ready(function() {
        $('#smslanguage').change(function() {
            if ($(this).val() == 'ar') {
                $('#message').attr('maxlength', 70);
                $('#message').val($('#message').val().substring(0, 70));
                $('#message').keyup()
            } else if ($(this).val() == 'en') {
                $('#message').attr('maxlength', 160);
                $('#message').keyup()
            } else
                return false;
        })
        $('#message').keydown(function() {
            $('#message').keyup()
        })
        $('#message').keyup(function() {
            var len = $('#message').val().length;
            if ($('#smslanguage').val() == 'ar') {
                $('#messagemax').html(70 - len);
            } else if ($('#smslanguage').val() == 'en'){
                $('#messagemax').html(160 - len);
            } else
                return false
        })
    })
</script>
<ul class="breadcrumb">
    <li><a href="<?= base_url() ?>"><?= lang('label_home') ?></a></li>
    <li><a href="<?= base_url('user_sms') ?>"><?= lang('label_menu_link_sms'); ?></a></li>
    <li><?= lang('label_menu_link_sendsms') ?></li>
</ul>


<div class="page">
    <form class="forms inside_1" id="send_sms_from" action="<?php echo current_url() ?>" method="post">
        <div class="select">
            <label for="smslanguage">
                <?php echo lang('label_sms_message_language') ?>
            </label>
            <samp>
                <select name="smslanguage" id="smslanguage">
                    <option value="ar"><?= lang('label_ar') ?></option>
                    <option value="en"><?= lang('label_en') ?></option>
                </select>
            </samp>
        </div>
        <div class="textarea">
            <label for="message">
                <?php echo lang('label_sms_message') ?>
            </label>
            <samp>
                <textarea name="message" id="message" maxlength="70" placeholder="<?php echo lang('label_sms_message') ?>" ><?php echo form_val('message') ?></textarea>
                <span style="<?= (LANG == 'ar') ? 'float:left;' : 'float:right;'; ?>"><?= lang('label_max_length') . ' ' ?><span id="messagemax">70</span></span>
            </samp>
        </div>
        <div><label></label><samp class="cost_result"></samp></div>
        <div class="submit">
            <input name="submit" value="<?= lang('label_done') ?>" type="submit"  >
        </div>

    </form>
</div>